//
//  HYHomeHeaderViewCell.m
//  XPlayer
//
//  Created by liguoqing on 2023/10/26.
//

#import "HYHomeHeaderViewCell.h"

@implementation HYHomeHeaderViewCell

- (void)configUI
{
    [super configUI];
    self.contentView.backgroundColor = UIColor.clearColor;
    self.coverView.contentMode = UIViewContentModeScaleAspectFit;
    [self addLongPressGesture];
}

- (void)bindViewModel:(HYHomeFileItemViewModel *)vm
{
    [super bindViewModel:vm];
    if(vm.isLock){
        self.coverView.image = [UIImage imageNamed:@"icon_head_lock"];
    }else{
        if(vm.fileType == HYHomeFileType_Document){
            self.coverView.image = [UIImage imageNamed:@"icon_head_folder"];
        }else if (vm.fileType == HYHomeFileType_Photo){
            self.coverView.image = [UIImage imageNamed:@"icon_head_photo"];
        }else if (vm.fileType == HYHomeFileType_Cloud){
            self.coverView.image = [UIImage imageNamed:@"icon_head_download"];
        }else if (vm.fileType == HYHomeFileType_Collect){
            self.coverView.image = [UIImage imageNamed:@"icon_head_collect"];
        }
    }
}


@end
